var mongoose = require('../common/db');

var recommendSchema = new mongoose.Schema({
    recommendImg: String,
    recommendSrc: String,
    recommendTitle: String
});

recommendSchema.statics.findByIndexId = function(m_id, callBack) {
    this.find({_Id: m_id}, callBack);
};

recommendSchema.statics.findAll = function(callBack) {
    this.find({}, callBack);
};

var recommendModel = mongoose.model('recommend', recommendSchema);

module.exports = recommendModel;